import { post } from '@/utils/request'
// 表单
// 列表
export const pageList = p => post(`/service-marketing/b/formDesign/v1/pageList?current=${p.current}&size=${p.size}&name=${p.name}&beginDateTime=${p.beginDateTime}&endDateTime=${p.endDateTime}&status=${p.status}&type=${p.type}`, p, 'get')
// 列表删除
export const pageDelete = p => post(`/service-marketing/b/formDesign/v1/delete`, p)
// 列表发布
export const pagePublish = p => post(`/service-marketing/b/formDesign/v1/publish`, p)
// 列表停止发布
export const pageStop = p => post(`/service-marketing/b/formDesign/v1/stop`, p)
// 新建表单
export const projectCreate = p => post(`/service-marketing/b/formDesign/v1/create`, p)

// 添加一个保存
export const projectUpdate = p => post(`/service-marketing/b/formDesign/v1/update`, p)

export const projectList = p => post(`/service-marketing/b/formDesign/v1/itemList?key=${p}`, p, 'get')

export const formKey = p => post(`/service-marketing/b/formDesign/v1/formKey/${p}`, p, 'get')

export const maxFormId = p => post(`/service-marketing/b/formDesign/v1/maxFormId?key=${p}`, p, 'get')

export const itemUpdate = p => post(`/service-marketing/b/formDesign/v1/itemUpdate`, p)

export const itemDelete = p => post(`/service-marketing/b/formDesign/v1/itemDelete`, p)

export const itemCreate = p => post(`/service-marketing/b/formDesign/v1/itemCreate`, p)

export const itemSort = p => post(`/service-marketing/b/formDesign/v1/itemSort`, p)

export const autograph = p => post(`/service-marketing/b/formDesign/v1/fileUpload`, p)

export const projectDetails = p => post(`/service-marketing/b/formDesign/v1/details/${p}`, p, 'get')

export const resultPage = p => post(`/service-marketing/b/formDesign/v1/resultPageList?current=${p.current}&size=${p.size}&projectKey=${p.projectKey}&beginDateTime=beginDateTime&endDateTime=beginDateTime`, p, 'get')
